$(function() {
	$('#vue_vm_list div').hide();
});

function save() {
	view.data.donateDate = $('#donateYear').val() + '-' + $('#donateMonth').val() + '-' + $('#donateDay').val();
	
	save_basic(path+'/donate/save', {donate:view.data}, function() {
		alert('保存成功');
		findAll();
	});
}

function donateFind() {
	if($('#vue_vm_list').length==0) {return;}
	$('#vue_vm_list div').hide();
	var month = $('#year').val() + '-' + $('#month').val();

	find_basic_by_json(path+'/donate/findByMonth',
			{month: month}, function(response) {
		$('#vue_vm_list').html(gl_vue_vm_list_html);
		
		new Vue({
			el: '#vue_vm_list',
			data: {
				todos: response.data
			}
		});
		
		$('#vue_vm_list div').show();
	});
}

function deleteBatch() {
	deleteBatch_basic(path+'/donate/deleteBatch');
}
